<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.fit.user.dao.*"  %>
<%@ page import="com.fit.user.entity.*"%>
<%@ page import="com.fit.user.util.*"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
 
<%
String contextPath = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+contextPath+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
 	<link href="<%=contextPath%>/img/skin/skin.css" rel="stylesheet" type="text/css" />
		<link href="<%=contextPath%>/css/sic.css" rel="stylesheet" type="text/css" />
	<style type="text/css">

body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}


</style>
 <!-- 得到所有的部门信息 -->
  <%
  SectionMsgDAO sectionMsgDAO = new SectionMsgDAO();
  List<SectionMsgEntity> list = sectionMsgDAO.getSectionMsg();
   %>
   <!-- 得到所在区域 -->
   <%
   String remoteAddr = request.getRemoteAddr();
 String macAddr = GetMACAddress.getMACAddress(remoteAddr);
 MacAddrMsgDAO macAddrMsgDAO = new MacAddrMsgDAO();
 String caseLocation = macAddrMsgDAO.getAreaByMac(macAddr);

    %>

   			<!-- 如果是管理员可以直接进入县局管理中心，普通民警此超链接不显示 -->
   			<!-- 获得民警照片的地址  -->
				 <% String policeID = (String)session.getAttribute("policeID");
				  PoliceMsgDAO policeMsgDAO = new PoliceMsgDAO();
				  String purview = policeMsgDAO.getPoliceMsg(policeID).getPurview();
				  String policeName = policeMsgDAO.getPoliceMsg(policeID).getPoliceName();
					String photoAddr = policeMsgDAO.getPoliceMsg(policeID).getPhotoAddr();
	 				%>
	 				
	 	
  </head>
  <body>
  <% 
  String erro = request.getParameter("erro");
  if(erro!=null){
  %>

  <script type="text/javascript">

  
function gofun_beian()
  {
  alert("你输入的部门或是姓名和警号不匹配");
  }
  
</script>
  <%
  }
  
   %>
  <% 
  String dberro = request.getParameter("dberro");
  if(dberro!=null){
  %>

  <script type="text/javascript">

  
function gofun_beian2()
  {
  alert("你输入的部门或是姓名和警号不匹配");
  }
  
</script>
  <%
  }
  
   %>

<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" >
  <tr>
    <td width="17" valign="top" background="<%=contextPath%>/img/skin/mail_leftbg.gif"><img src="<%=contextPath%>/img/skin/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="<%=contextPath%>/img/skin/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">新建备案</div></td>

      </tr>
    </table></td>
    <td width="16" valign="top" background="<%=contextPath%>/img/skin/mail_rightbg.gif"><img src="<%=contextPath%>/img/skin/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="<%=contextPath%>/img/skin/mail_leftbg.gif">&nbsp;</td>
  
    <td valign="top" bgcolor="#F7F8F9"  class="table_boder">
   <table width="800" align="center">
   <tr>

   <td width="300px;"></td>
   <td>
   <h1>办案区使用备案登记</h1>
  <form method="post" action="servlet/Register" >

  <table width="600" height="400" cellpadding="0" cellspacing="0" style="margin-top: 10px;margin-left: 30px;" >
		<tr>
  
 
		<td valign="top" align="left">
       备案事由：<input type ="text" name = "caseCause"><br>
        <input type = "hidden" name = "policeID" value = "<%=session.getAttribute("policeID") %>"><br/>
           备案名称：<input type ="text" name = "caseName"><br>
           <br/>
          办案场所： <input type="text" name ="caseLocation" readonly="readonly" value="<%=caseLocation %>"/>自动生成,无需录入)<br/><br/>
   		        办案单位： <select   name="policeSect" style='width:153px'>
   		         <option value="0">-请选择-</option>
		<c:forEach var="sectionMsgEntity" items="<%=list%>">
    <option value="${sectionMsgEntity.sectionID }">${sectionMsgEntity.sectionName }</option>
		</c:forEach>
    </select><br/><br/>
  <!-- 办案区显示位置 -->
        民警姓名：<input type = "text" name = "policeName"><br/><br/><br/>
   			<input type="submit" value="提交">
   			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="reset">
			
			</td></tr>
			</form>
			<tr><td>
			<a href = "police/handle_pre_case.jsp">如果你要继续处理上次的案件，请单击此处</a><br/>

				<%
				if(purview != null && purview.equals("0")){
				 %>
						<a href="police/manager.jsp">县局管理中心</a>
					<%
					}
					%>
					<!-- 修改密码功能 -->
					<a href="police/password_modify.jsp">修改密码</a>
   </td>
   
   </tr></table>
   
						</td></tr></table>
	</td>
    <td background="<%=contextPath%>/img/skin/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="<%=contextPath%>/img/skin/mail_leftbg.gif"><img src="<%=contextPath%>/img/skin/buttom_left2.gif" width="17" height="17" /></td>
    <td background="<%=contextPath%>/img/skin/buttom_bgs.gif"><img src="<%=contextPath%>/img/skin/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="<%=contextPath%>/img/skin/mail_rightbg.gif"><img src="<%=contextPath%>/img/skin/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
  </body>
</html>
